package appserver;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class AppServer {
	private static final int PORTA = 8080;
	public static void main(String[] args)throws IOException {
		ServerSocket serverSocket = new ServerSocket(PORTA);
		System.out.println("Socket aberto na porta " + PORTA);
		
		while (true){
			System.out.println("esperando...");
			Socket socket = serverSocket.accept();
			System.out.println("conectou!");
			new AppServerThread(socket).start();
		}
	}
}
